 <?php
 session_start();
 $uid = $_COOKIE["USER_ID_ADMIN_LIBRARY"];
 $interface = mysql_query("SELECT * FROM interface");
$interface_get= mysql_fetch_array( $interface );
$libraryname= $interface_get['name']; 

echo "<title>$libraryname- $pagename</title>";
 
 
$user = mysql_query("SELECT * FROM users WHERE id = $uid");
$fuser = mysql_fetch_array($user);
$ulevel = $fuser["Priv"];

?>
<script type="text/javascript">
function goBack()
  {
  window.history.back()
  }
</script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<style>
html {background-color:#fff;}
body {background-color:#303030; color:#fff; margin:0 auto;  
padding:30px 30px 40px;}
 
#nav {
 background: url(images/bgtp.png) repeat;
 height:50px;
 width:770px;
  list-style: none;
  margin: 0 auto;
 margin-top:30px;
 margin-bottom:5px;
 text-transform: lowercase;
font-family: arial, "lucida console", sans-serif;
  }
#OK {
color:red
}

 p
{
text-align: center 
font-size: 25pt;
text-align: center;
color: orange;
font-family: arial
}
.one{
	margin-left:200px;
	
}	


ul#nav {margin:0px auto; margin-left: auto;
   margin-right: auto;}
ul.drop a { display:block; color: #fff; font-family: Verdana; font-size: 14px; text-decoration: none;}
ul.drop, ul.drop li, ul.drop ul { list-style: none; margin: 0; padding: 0;  background: #555; color: #fff; text-align: center;}
ul.drop { position: relative; z-index: 597; float: left; text-align: center; }
ul.drop li { float: left; line-height: 1.3em; vertical-align: middle; zoom: 1; padding: 5px 10px; text-align: center; }
ul.drop li.hover, ul.drop li:hover { position: relative; z-index: 599; cursor: default; background: #1e7c9a; text-align: center; }
ul.drop ul { visibility: hidden; position: absolute; top: 100%; left: 0; z-index: 598; width: 195px;  text-align: center; }
ul.drop ul li { float: none; text-align: center; }
ul.drop ul ul { top: -2px; left: 100%; text-align: center; }
ul.drop li:hover > ul { visibility: visible }				
}	

</style>
</head>

<body>
<P><?echo $libraryname?></P>
<!-- You can change the links here or add more according to your site-->
<ul id="nav" class="drop">
  <li><a href="?p=">Home</a></li>
  <li>Book Manager
    <ul>
      <li><a href="?p=bookman/addbook.php">Add a Book</a></li>
      <li><a href="?p=bookman/search.php">Search</a></li>
      <li><a href="#">Remove Book</a></li>
      
    </ul>
	
  </li>
  <li><a href="?p=patron/index.php">Patron Management</a> </li>
  <li><a href="?p=checkout/index.php">Checkout</a></li>
  <li><a href="?p=checkin/index.php">Check-in</a> </li>
  <?if ($fuser['priv'] == '5') {
echo '
<li><a href="?p=admin/index.php">Admin</a></li>';
}?>


<li><a href="?p=logout.php">logout</a> </li>
</ul>

</body>
</html>
<?
if(!isset($_SESSION['SESS_MEMBER_ID']) || (trim($_SESSION['SESS_MEMBER_ID']) == '')) {
		?><html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Login Form</title>
<link href="loginmodule2.css" rel="stylesheet" type="text/css" />
</head>
<body>
<p>&nbsp;</p>
<form id="loginForm" name="loginForm" method="post" action="login-exec.php">
  <table width="300" border="0" align="center" cellpadding="2" cellspacing="0">
    <tr>
	<?php
	if (isset($_GET['403'])) { echo "<Font COLOR='red'>ERROR: 403 Access Denied, Please Login</font>";}
  if (isset($_GET['logout'])) { echo "<Font COLOR='Green'>You Are Now Logged Out!</font>";}
	?>
      <td width="112"><b>Login</b></td>
      <td width="188"><input name="login" type="text" class="textfield" id="login" /></td>
    </tr>
    <tr>
      <td><b>Password</b></td>
      <td><input name="password" type="password" class="textfield" id="password" /></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><input type="submit" name="Submit" value="Login" /></td>
    </tr>
  </table>
</form>
</body>
</html> <?
		exit();
	}
?>
<br>
<br>
<center>
<h4>MESSAGE FROM ADMINISTRATOR: <?php
$sql = $sql = mysql_query("select * from notices");
echo '<table border="0">';
while ($row = mysql_fetch_array($sql)){
$messid = $row['id'];
$mess = $row['notice'];
$display = $row['show'];
echo "<tr>";
echo "<td>$mess</td>";
}
echo "</table>";
?>

</table>
</h4>
</center>